import request from '@/utils/request'

// 查询订单变更列表
export function listChangeOrder (query) {
  return request({
    url: '/system/changeOrder/list',
    method: 'get',
    params: query
  })
}

// 查询订单变更详细
export function getChangeOrder (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/changeOrder/getInfo',
    method: 'get',
    params: params
  })
}

// 新增订单变更
export function addChangeOrder (data) {
  return request({
    url: '/system/changeOrder/insert',
    method: 'post',
    data: data
  })
}

// 修改订单变更
export function updateChangeOrder (data) {
  return request({
    url: '/system/changeOrder/update',
    method: 'post',
    data: data
  })
}

// 删除订单变更
export function delChangeOrder (id) {
  const params = {
    'id': id
  }
  return request({
    url: '/system/changeOrder/delete',
    method: 'post',
    params: params
  })
}
// 批量删除订单变更
export function delBatchChangeOrder (ids) {
  const params = {
    'ids': ids
  }
  return request({
    url: '/system/changeOrder/deleteBatch',
    method: 'post',
    params: params
  })
}

// 导入订单变更
export function importData (data) {
  return request({
    url: '/system/changeOrder/importData',
    method: 'post',
    data: data
  })
}
